package com.example.novelstory.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@ApiModel(value = "作家信息")
public class Author {
    @ApiModelProperty("作者ID")
    private int id;//@TableId表示主键，与字段名称大小写一致
    @ApiModelProperty("作者名字")
    private String authorname;
    @ApiModelProperty("用户名字")
    private String username;
    @JsonFormat(pattern="yyyy-MM-dd hh:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @ApiModelProperty("注册作者时间")
    private Date login_time;
}